<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: Origami::String::Encoding::PDFDocEncoding</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Origami::String::Encoding::PDFDocEncoding</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/origami/string_rb.html">
                origami/string.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000410">to_pdfdoc</a>&nbsp;&nbsp;
      <a href="#M000409">to_utf16be</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">CHARMAP</td>
          <td>=</td>
          <td class="context-item-value">[           &quot;\x00\x00&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;,           &quot;\xff\xfd&quot;, &quot;\x00\x09&quot;, &quot;\x00\x0a&quot;, &quot;\xff\xfd&quot;, &quot;\x00\x0c&quot;, &quot;\x00\x0d&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;,           &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;, &quot;\xff\xfd&quot;,           &quot;\x02\xd8&quot;, &quot;\x02\xc7&quot;, &quot;\x02\xc6&quot;, &quot;\x02\xd9&quot;, &quot;\x02\xdd&quot;, &quot;\x02\xdb&quot;, &quot;\x02\xda&quot;, &quot;\x02\xdc&quot;,           &quot;\x00\x20&quot;, &quot;\x00\x21&quot;, &quot;\x00\x22&quot;, &quot;\x00\x23&quot;, &quot;\x00\x24&quot;, &quot;\x00\x25&quot;, &quot;\x00\x26&quot;, &quot;\x00\x27&quot;,           &quot;\x00\x28&quot;, &quot;\x00\x29&quot;, &quot;\x00\x2a&quot;, &quot;\x00\x2b&quot;, &quot;\x00\x2c&quot;, &quot;\x00\x2d&quot;, &quot;\x00\x2e&quot;, &quot;\x00\x2f&quot;,           &quot;\x00\x30&quot;, &quot;\x00\x31&quot;, &quot;\x00\x32&quot;, &quot;\x00\x33&quot;, &quot;\x00\x34&quot;, &quot;\x00\x35&quot;, &quot;\x00\x36&quot;, &quot;\x00\x37&quot;,           &quot;\x00\x38&quot;, &quot;\x00\x39&quot;, &quot;\x00\x3a&quot;, &quot;\x00\x3b&quot;, &quot;\x00\x3c&quot;, &quot;\x00\x3d&quot;, &quot;\x00\x3e&quot;, &quot;\x00\x3f&quot;,           &quot;\x00\x40&quot;, &quot;\x00\x41&quot;, &quot;\x00\x42&quot;, &quot;\x00\x43&quot;, &quot;\x00\x44&quot;, &quot;\x00\x45&quot;, &quot;\x00\x46&quot;, &quot;\x00\x47&quot;,           &quot;\x00\x48&quot;, &quot;\x00\x49&quot;, &quot;\x00\x4a&quot;, &quot;\x00\x4b&quot;, &quot;\x00\x4c&quot;, &quot;\x00\x4d&quot;, &quot;\x00\x4e&quot;, &quot;\x00\x4f&quot;,           &quot;\x00\x50&quot;, &quot;\x00\x51&quot;, &quot;\x00\x52&quot;, &quot;\x00\x53&quot;, &quot;\x00\x54&quot;, &quot;\x00\x55&quot;, &quot;\x00\x56&quot;, &quot;\x00\x57&quot;,           &quot;\x00\x58&quot;, &quot;\x00\x59&quot;, &quot;\x00\x5a&quot;, &quot;\x00\x5b&quot;, &quot;\x00\x5c&quot;, &quot;\x00\x5d&quot;, &quot;\x00\x5e&quot;, &quot;\x00\x5f&quot;,           &quot;\x00\x60&quot;, &quot;\x00\x61&quot;, &quot;\x00\x62&quot;, &quot;\x00\x63&quot;, &quot;\x00\x64&quot;, &quot;\x00\x65&quot;, &quot;\x00\x66&quot;, &quot;\x00\x67&quot;,           &quot;\x00\x68&quot;, &quot;\x00\x69&quot;, &quot;\x00\x6a&quot;, &quot;\x00\x6b&quot;, &quot;\x00\x6c&quot;, &quot;\x00\x6d&quot;, &quot;\x00\x6e&quot;, &quot;\x00\x6f&quot;,           &quot;\x00\x70&quot;, &quot;\x00\x71&quot;, &quot;\x00\x72&quot;, &quot;\x00\x73&quot;, &quot;\x00\x74&quot;, &quot;\x00\x75&quot;, &quot;\x00\x76&quot;, &quot;\x00\x77&quot;,           &quot;\x00\x78&quot;, &quot;\x00\x79&quot;, &quot;\x00\x7a&quot;, &quot;\x00\x7b&quot;, &quot;\x00\x7c&quot;, &quot;\x00\x7d&quot;, &quot;\x00\x7e&quot;, &quot;\xff\xfd&quot;,           &quot;\x20\x22&quot;, &quot;\x20\x20&quot;, &quot;\x20\x21&quot;, &quot;\x20\x26&quot;, &quot;\x20\x14&quot;, &quot;\x20\x13&quot;, &quot;\x01\x92&quot;, &quot;\x20\x44&quot;,           &quot;\x20\x39&quot;, &quot;\x20\x3a&quot;, &quot;\x22\x12&quot;, &quot;\x20\x30&quot;, &quot;\x20\x1e&quot;, &quot;\x20\x1c&quot;, &quot;\x20\x1d&quot;, &quot;\x20\x18&quot;,           &quot;\x20\x19&quot;, &quot;\x20\x1a&quot;, &quot;\x21\x22&quot;, &quot;\xfb\x01&quot;, &quot;\xfb\x02&quot;, &quot;\x01\x41&quot;, &quot;\x01\x52&quot;, &quot;\x01\x60&quot;,           &quot;\x01\x78&quot;, &quot;\x01\x7d&quot;, &quot;\x01\x31&quot;, &quot;\x01\x42&quot;, &quot;\x01\x53&quot;, &quot;\x01\x61&quot;, &quot;\x01\x7e&quot;, &quot;\xff\xfd&quot;,           &quot;\x20\xac&quot;, &quot;\x00\xa1&quot;, &quot;\x00\xa2&quot;, &quot;\x00\xa3&quot;, &quot;\x00\xa4&quot;, &quot;\x00\xa5&quot;, &quot;\x00\xa6&quot;, &quot;\x00\xa7&quot;,           &quot;\x00\xa8&quot;, &quot;\x00\xa9&quot;, &quot;\x00\xaa&quot;, &quot;\x00\xab&quot;, &quot;\x00\xac&quot;, &quot;\xff\xfd&quot;, &quot;\x00\xae&quot;, &quot;\x00\xaf&quot;,           &quot;\x00\xb0&quot;, &quot;\x00\xb1&quot;, &quot;\x00\xb2&quot;, &quot;\x00\xb3&quot;, &quot;\x00\xb4&quot;, &quot;\x00\xb5&quot;, &quot;\x00\xb6&quot;, &quot;\x00\xb7&quot;,           &quot;\x00\xb8&quot;, &quot;\x00\xb9&quot;, &quot;\x00\xba&quot;, &quot;\x00\xbb&quot;, &quot;\x00\xbc&quot;, &quot;\x00\xbd&quot;, &quot;\x00\xbe&quot;, &quot;\x00\xbf&quot;,           &quot;\x00\xc0&quot;, &quot;\x00\xc1&quot;, &quot;\x00\xc2&quot;, &quot;\x00\xc3&quot;, &quot;\x00\xc4&quot;, &quot;\x00\xc5&quot;, &quot;\x00\xc6&quot;, &quot;\x00\xc7&quot;,           &quot;\x00\xc8&quot;, &quot;\x00\xc9&quot;, &quot;\x00\xca&quot;, &quot;\x00\xcb&quot;, &quot;\x00\xcc&quot;, &quot;\x00\xcd&quot;, &quot;\x00\xce&quot;, &quot;\x00\xcf&quot;,           &quot;\x00\xd0&quot;, &quot;\x00\xd1&quot;, &quot;\x00\xd2&quot;, &quot;\x00\xd3&quot;, &quot;\x00\xd4&quot;, &quot;\x00\xd5&quot;, &quot;\x00\xd6&quot;, &quot;\x00\xd7&quot;,           &quot;\x00\xd8&quot;, &quot;\x00\xd9&quot;, &quot;\x00\xda&quot;, &quot;\x00\xdb&quot;, &quot;\x00\xdc&quot;, &quot;\x00\xdd&quot;, &quot;\x00\xde&quot;, &quot;\x00\xdf&quot;,           &quot;\x00\xe0&quot;, &quot;\x00\xe1&quot;, &quot;\x00\xe2&quot;, &quot;\x00\xe3&quot;, &quot;\x00\xe4&quot;, &quot;\x00\xe5&quot;, &quot;\x00\xe6&quot;, &quot;\x00\xe7&quot;,           &quot;\x00\xe8&quot;, &quot;\x00\xe9&quot;, &quot;\x00\xea&quot;, &quot;\x00\xeb&quot;, &quot;\x00\xec&quot;, &quot;\x00\xed&quot;, &quot;\x00\xee&quot;, &quot;\x00\xef&quot;,           &quot;\x00\xf0&quot;, &quot;\x00\xf1&quot;, &quot;\x00\xf2&quot;, &quot;\x00\xf3&quot;, &quot;\x00\xf4&quot;, &quot;\x00\xf5&quot;, &quot;\x00\xf6&quot;, &quot;\x00\xf7&quot;,            &quot;\x00\xf8&quot;, &quot;\x00\xf9&quot;, &quot;\x00\xfa&quot;, &quot;\x00\xfb&quot;, &quot;\x00\xfc&quot;, &quot;\x00\xfd&quot;, &quot;\x00\xfe&quot;, &quot;\x00\xff&quot;</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000410" class="method-detail">
        <a name="M000410"></a>

        <div class="method-heading">
          <a href="#M000410" class="method-signature">
          <span class="method-name">to_pdfdoc</span><span class="method-args">(str)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000410-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000410-source">
<pre>
    <span class="ruby-comment cmt"># File origami/string.rb, line 81</span>
81:         <span class="ruby-keyword kw">def</span> <span class="ruby-constant">PDFDocEncoding</span>.<span class="ruby-identifier">to_pdfdoc</span>(<span class="ruby-identifier">str</span>)
82:           <span class="ruby-identifier">str</span>
83:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000409" class="method-detail">
        <a name="M000409"></a>

        <div class="method-heading">
          <a href="#M000409" class="method-signature">
          <span class="method-name">to_utf16be</span><span class="method-args">(pdfdocstr)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000409-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000409-source">
<pre>
    <span class="ruby-comment cmt"># File origami/string.rb, line 71</span>
71:         <span class="ruby-keyword kw">def</span> <span class="ruby-constant">PDFDocEncoding</span>.<span class="ruby-identifier">to_utf16be</span>(<span class="ruby-identifier">pdfdocstr</span>)
72: 
73:           <span class="ruby-identifier">utf16bestr</span> = <span class="ruby-node">&quot;#{UTF16BE::MAGIC}&quot;</span>
74:           <span class="ruby-identifier">pdfdocstr</span>.<span class="ruby-identifier">each_byte</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">byte</span><span class="ruby-operator">|</span>
75:             <span class="ruby-identifier">utf16bestr</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">CHARMAP</span>[<span class="ruby-identifier">byte</span>]
76:           <span class="ruby-keyword kw">end</span>
77: 
78:           <span class="ruby-identifier">utf16bestr</span>
79:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>